home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
source
/
zendisk1
/
lst10-9.asm
< prev
next >
Wrap
Assembly Source File
|
1990-02-15
|
501b
|
23 lines
;
; *** Listing 10-9 ***
;
; Sets every element of a 1000-byte array to 1 by
; repeating STOSB 1000 times.
;
jmp Skip
;
ARRAY_LENGTH equ 1000
ByteArray db ARRAY_LENGTH dup (?)
;
Skip:
call ZTimerOn
mov di,seg ByteArray
mov es,di ;point ES:DI to the array to fill
mov di,offset ByteArray
mov al,1 ;we'll fill with the value 1
mov cx,ARRAY_LENGTH ;# of bytes to fill
cld ;make STOSB increment DI after
; each execution
rep stosb ;initialize the array
call ZTimerOff